package service

import (
	"net/http"

	"github.com/golang/glog"
)

var CrashChan chan struct{}

func Hello(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("Hello world!"))
}

func Crash(w http.ResponseWriter, r *http.Request) {
	if CrashChan == nil {
		glog.Errorf("CrashChan havent init.")
		return
	}

	CrashChan <- struct{}{}
}
